﻿using BW.WMS.Application.Features.Bins.Dtos;
using BW.WMS.Core.Result;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BW.WMS.Application.Features.Bins.Interfaces
{
    /// <summary>
    /// WMS仓库管理—货位服务接口层
    /// </summary>
    public interface IWMS_BinService
    {
        /// <summary>
        /// 获取货位分页列表，支持多条件查询
        /// </summary>
        /// <param name="queryDto">查询条件DTO</param>
        /// <returns>货位分页数据</returns>
        Task<ApiPage<WMS_BinDto>> GetBinPageListAsync(WMS_BinQueryDto queryDto);

        /// <summary>
        /// 根据ID获取货位详情
        /// </summary>
        /// <param name="id">货位ID</param>
        /// <returns>货位详情DTO</returns>
        Task<ApiResult<WMS_BinDto>> GetBinByIdAsync(long id);

        /// <summary>
        /// 创建新货位
        /// </summary>
        /// <param name="createDto">货位创建DTO</param>
        /// <returns>操作结果，成功时返回新创建的货位ID</returns>
        Task<ApiResult<long>> CreateBinAsync(WMS_BinCreateDto createDto);

        /// <summary>
        /// 更新货位信息
        /// </summary>
        /// <param name="updateDto">货位更新DTO</param>
        /// <returns>操作结果，表示更新是否成功</returns>
        Task<ApiResult<bool>> UpdateBinAsync(WMS_BinUpdateDto updateDto);

        /// <summary>
        /// 删除货位（逻辑删除）
        /// </summary>
        /// <param name="id">货位ID</param>
        /// <returns>操作结果，表示删除是否成功</returns>
        Task<ApiResult<bool>> DeleteBinAsync(long id);

        /// <summary>
        /// 批量删除货位（逻辑删除）
        /// </summary>
        /// <param name="ids">货位ID列表</param>
        /// <returns>操作结果，表示删除是否成功</returns>
        Task<ApiResult<bool>> BatchDeleteBinsAsync(List<long> ids);

        /// <summary>
        /// 更新货位状态
        /// </summary>
        /// <param name="id">货位ID</param>
        /// <param name="status">新状态值</param>
        /// <param name="updatedBy">操作人</param>
        /// <returns>操作结果，表示状态更新是否成功</returns>
        Task<ApiResult<bool>> UpdateBinStatusAsync(long id, int status, string updatedBy);
    }
}
